class AlgorithmPath: public Algorithm{
public:
AlgorithmPath( Graph *g ): Algorithm( g ){
	containerAdd();
	m_container = &container(0);
	m_container->push_back( (new ContainerElement())->setNode(graph()->node(0)) );
}

void run(){
 //For each node in our container that we considered reachable
 for( int i = 0; i < m_container->size(); i++ ){
  //Store this node temporarily
  const Node currentNode = *(*m_container)[i]->node();
  //For each edge in the graph
  for( int j = 0; j < graph()->numEdges(); j++ ){
   //Store this edge temporarily
   const Edge currentEdge = graph()->edge(j);
   
   //If this edge starts from this node
   if( currentEdge.from() != currentNode )
    continue;
   
   highlight(currentEdge);
   bool alreadyContained = false;
   for( int k = 0; k < m_container->size() && !alreadyContained; k++ )
    alreadyContained = currentEdge.to() == *(*m_container)[k]->node();
   if(!alreadyContained)
    m_container->push_back( (new ContainerElement)->setNode(currentEdge.to()) );
  
  }
 }
}
private:
Container *m_container;
}; 
